import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIcons from '@element-plus/icons-vue'
import locale from 'element-plus/es/locale/lang/zh-cn'
import router from './router'
import * as echarts from 'echarts'
import axios from 'axios'

const app = createApp(App)

for (let i in ElIcons) {
    app.component(i, ElIcons[i])
  }

app.config.globalProperties.$axios = axios
// axios.defaults.baseURL = '/api'

app.use(ElementPlus, { locale })
app.use(router)
app.config.globalProperties.$echarts = echarts
app.mount('#app')